package UseString.demo02;

public class StringReverse {
    public static void main(String[] args) {
        String str = reverse("123");
        System.out.println(str);


    }
    public static String reverse(String str){
        String result = "";
        for (int i = str.length()-1; i >=0; i--) {
            char c = str.charAt(i);
            result = result + c;

        }
        return result;
    }
}
